<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.embrion.bean.*"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="head.html"%>
</head>
<body>
	<%@include file="top.jsp"%>
	<div class="corpo">

		<form name="salvaAggiornaClasse"
			action="Controller?action=<%=Const.salvaAggiornaClasse%>"
			method="post">
			<input type="hidden" name="id_classe" value="<%=request.getAttribute(Const.id_classe) %>" />
			
			<table class="tabella_aula">
				<tr>
					<th></th>
					<th colspan="2">Biglietto</th>
				</tr>
				<tr>
					<th align="left">Alunno</th>
					<th><span style="color: green;">SI</span></th>
					<th><span style="color: red;">NO</span></th>
				</tr>

				<%
					@SuppressWarnings("unchecked")
					ArrayList<Alunno> alunnoAL = (ArrayList<Alunno>) request
							.getAttribute(Const.listaAlunni);

					int i = 1;
					for (Alunno a : alunnoAL) {
						out.print("<tr class=\"tr_mouse_over\">");
						out.print("<td>"
								+ i++
								+ " - "
								+ a.getCognome()
								+ " "
								+ a.getNome()
								+ "</td><td align=\"center\"><input type=\"radio\" name=\""
								+ a.getId()
								+ "\" value=\"si\" /></td><td align=\"center\"><input type=\"radio\" name=\""
								+ a.getId() + "\" value=\"no\" /></td>");
						out.print("</tr>");
					}
				%>

<tr><td></td><td colspan="2" align="center"><input type="submit" value="SALVA"></td></tr>
			</table>

		</form>
	</div>

</body>
</html>